package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCompanyReportMapper;
import com.ruoyi.system.domain.SysCompanyReport;
import com.ruoyi.system.service.ISysCompanyReportService;

/**
 * 企业诊断报告Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-26
 */
@Service
public class SysCompanyReportServiceImpl implements ISysCompanyReportService 
{
    @Autowired
    private SysCompanyReportMapper sysCompanyReportMapper;

    /**
     * 查询企业诊断报告
     * 
     * @param reportId 企业诊断报告主键
     * @return 企业诊断报告
     */
    @Override
    public SysCompanyReport selectSysCompanyReportByReportId( Long deptId)
    {
        return sysCompanyReportMapper.selectSysCompanyReportByReportId(deptId);
    }

    /**
     * 查询企业诊断报告列表
     * 
     * @param sysCompanyReport 企业诊断报告
     * @return 企业诊断报告
     */
    @Override
    public List<SysCompanyReport> selectSysCompanyReportList(SysCompanyReport sysCompanyReport)
    {
        return sysCompanyReportMapper.selectSysCompanyReportList(sysCompanyReport);
    }

    /**
     * 新增企业诊断报告
     * 
     * @param sysCompanyReport 企业诊断报告
     * @return 结果
     */
    @Override
    public int insertSysCompanyReport(SysCompanyReport sysCompanyReport)
    {
        sysCompanyReport.setCreateTime(DateUtils.getNowDate());
        return sysCompanyReportMapper.insertSysCompanyReport(sysCompanyReport);
    }

    /**
     * 修改企业诊断报告
     * 
     * @param sysCompanyReport 企业诊断报告
     * @return 结果
     */
    @Override
    public int updateSysCompanyReport(SysCompanyReport sysCompanyReport)
    {
        sysCompanyReport.setUpdateTime(DateUtils.getNowDate());
        return sysCompanyReportMapper.updateSysCompanyReport(sysCompanyReport);
    }

    /**
     * 批量删除企业诊断报告
     * 
     * @param reportIds 需要删除的企业诊断报告主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyReportByReportIds(Long[] reportIds)
    {
        return sysCompanyReportMapper.deleteSysCompanyReportByReportIds(reportIds);
    }

    /**
     * 删除企业诊断报告信息
     * 
     * @param reportId 企业诊断报告主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyReportByReportId(Long reportId)
    {
        return sysCompanyReportMapper.deleteSysCompanyReportByReportId(reportId);
    }
}
